package com.thread.CountDownLatchDemo;

import java.util.concurrent.CountDownLatch;

/**
 * @Author milian
 * @Date 2021/7/31 0031 9:32
 */
public class demo1 {
    public static void main(String[] args) {
        CountDownLatch downLatch = new CountDownLatch(3);
        mother mother = new mother(downLatch);
        mother.start();
        son1 son1 = new son1(downLatch);
        son1.setName("小明");
        son2 son2 = new son2(downLatch);
        son2.setName("小红");
        son3 son3 = new son3(downLatch);
        son3.setName("小刚");
        son1.start();
        son2.start();
        son3.start();
    }
}
